﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;

namespace WorkOrders.Data
{
    class SingletonStrategy : ISessionStrategy
    {
        private static ISession _session;

        public NHibernate.ISession FindSession()
        {
            return _session; 
        }

        public void AddSession(ISession session)
        {
            SingletonStrategy._session = session;
        }

        public void RemoveSession()
        {
            SingletonStrategy._session = null;
        }
    }
}